<template>
    <div>
       <van-card :price="list.price/100" :title="list.name" >

           <template #tags>
               <van-tag style="margin-right:50px;color:#000;background:none;"  type="danger">{{list.goodCommentsShare}}万个评价</van-tag>
               <van-tag style="margin-right:50px;color:#000;background:none;" type="danger" >好评率:{{list.goodCommentsShare}}</van-tag>
           </template>
           <template #footer>
             <van-button size="mini" class="btn" style="font-size:14px;">详情 ></van-button>
           </template>
       </van-card>
</div>

</template>

<script>
import Vue from 'vue'
// import { Card } from 'vant';
import { Tag, Card, Button } from 'vant'
import http from '@/util/http'

Vue.use(Card).use(Button).use(Tag)
Vue.use(Card)
export default {
  data () {
    return {
      list: {}
    }
  },
  mounted () {
    // console.log('id', this.$route.query.id)
    http({
      url: `/heihei/api/union/product/product_detail?c=h5&s=20000&t=1605160945678&v=1.0&skuId=${this.$route.query.id}`
    }).then(res => {
      console.log(res.data.data)
      this.list = res.data.data
      // console.log(this.list)
    })
  }
}
</script>
<style lang="scss" scoped>
    .btn{
        position: absolute;right: 10px;top: 35px;
        font-size: 16px;
    }
    .van-card__price div{
        color: red;
    }
    .van-tag--danger {
    background:none;
}
    .van-button--default{
        background: rgb(255, 250, 250);
    }
</style>
